{% extends "base.html" %}
{% load i18n static wger_extras django_bootstrap_breadcrumbs %}

{% block title %}{{new_user|format_username}}{% endblock %}


{% block breadcrumbs %}
    {{ block.super }}

    {% if perms.gym.manage_gyms %}
        {% breadcrumb "Gyms" "gym:gym:list" %}
    {% endif %}
    {% breadcrumb_raw new_user.userprofile.gym "gym:gym:user-list" new_user.userprofile.gym.pk %}
    {% breadcrumb_raw new_user|format_username "core:user:overview" new_user.pk %}
    {% breadcrumb "User" "gym:document:list" new_user.pk %}
{% endblock %}


{% block content %}
<table class="table">
    <tr>
        <th>{% translate "User" %}</th>
        <td>{{new_user.get_full_name}} ({{new_user}})</td>
    </tr>
    <tr>
        <th>{% translate "Password" %}</th>
        <td>{{password}}</td>
    </tr>
    <tr>
        <th>{% translate "Email" %}</th>
        <td>{{new_user.email|default:'-/-'}}</td>
    </tr>
    <tr>
        <th>{% translate "Gym" %}</th>
        <td>{{new_user.userprofile.gym}}</td>
    </tr>
    <tr>
        <th>{% translate "Date of Birth" %}</th>
        <td>{{new_user.userprofile.birthdate}}</td>
    </tr>
</table>
{% endblock %}




{% block sidebar %}
<h4>{% translate "Info" %}</h4>
<p>
    {% blocktranslate %}Please write down the user password or save the exported
file, which contains all the user data, and keep it in a safe place. The password
cannot be recovered later.{% endblocktranslate %}
</p>

<p>
    <a href="{% url 'gym:gym:new-user-data-export' %}">
        {% translate "Export user data" %}
    </a>
</p>
{% endblock %}
